//! Header for the ICommand interfaceclass
#ifndef SWITCHOFFCOMMAND_H
#define SWITCHOFFCOMMAND_H

#include "Device.h"
#include "ICommand.h"

//! Concrete command to switch on devices
/*!
	This command switches on its device
	\class SwitchOffCommand
	\author Thomas Pfeiffer
	\date 21.12.2012
*/
class SwitchOffCommand : public ICommand {
public:

	//! CTor of the SwitchOffCommand
	/*!
	The CTor sets the Device the command acts on.
	\param dev The device the command acts on.
	\throws std::exception in case dev is null
	*/
	SwitchOffCommand(Device * dev);

	void Execute();
	
	void Undo();

private:
	Device * mDevice;
	OnOffState mLastState;
};

#endif